package shiqi.ProxyPattern.springAop;

import java.lang.reflect.InvocationHandler;

public class MyProxy implements AbstarctSubject {

    private AbstarctSubject abstarctSubject = new RealSubjectA();
    private InvocationHandler invocationHandler = new DynamicProxy(abstarctSubject);;

    @Override
    public void request() {
        try {
            String[] strings = null;
            invocationHandler.invoke(invocationHandler,abstarctSubject.getClass().getMethod("request",strings.getClass()),null);
        } catch (Throwable throwable) {
            throwable.printStackTrace();
        }
    }


}
